package com.wzxy.model;

import javax.persistence.Column;
import javax.persistence.Entity;  
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;  
import javax.persistence.Table;  
  
@Entity  
@Table(name="t_group")  
public class Group {  
    private int id;  
    private String name; 
    
    public Group() {  
    }  
    public Group(String name) {  
        super();  
        this.name = name;  
    }  
 
    @Id  
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID",nullable = false,length = 9)
    public int getId() {  
        return id;  
    }  
    public void setId(int id) {  
        this.id = id;  
    }  
    @Column(name = "NAME",nullable = false,length = 20)
    public String getName() {  
        return name;  
    }  
    public void setName(String name) {  
        this.name = name;  
    }  
    @Override  
    public String toString() {  
        return "Group [id=" + id + ", name=" + name + "]";  
    }  
  
}  